<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  readonly class="form-control" type="number" value="{$row.num|htmlentities}">
        </div>
    </div>
    {if condition="$store_id eq 0"}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Store_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-store_id" data-rule="required" data-source="store/index" data-field="store_name" class="form-control selectpage" name="row[store_id]" type="text" value="{$row.store_id|htmlentities}">
        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Plate_number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-plate_number" data-rule="required" class="form-control" name="row[plate_number]" type="text" value="{$row.plate_number|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Vehicle_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-vehicle_type" data-rule="required" class="form-control" name="row[vehicle_type]" type="text" value="{$row.vehicle_type|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Brand_model')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-brand_model" data-rule="required" class="form-control" name="row[brand_model]" type="text" value="{$row.brand_model|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Plate_color')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-plate_color" data-rule="required" class="form-control" name="row[plate_color]" type="text" value="{$row.plate_color|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_install')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-is_install" data-rule="required" class="form-control selectpicker" name="row[is_install]">
                {foreach name="isInstallList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.is_install"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Frame_number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-frame_number" data-rule="required" class="form-control" name="row[frame_number]" type="text" value="{$row.frame_number|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Engine_number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-engine_number" data-rule="required" class="form-control" name="row[engine_number]" type="text" value="{$row.engine_number|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Engine_model')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-engine_model" data-rule="required" class="form-control" name="row[engine_model]" type="text" value="{$row.engine_model|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Fuel_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-fuel_type" data-rule="required" class="form-control" name="row[fuel_type]" type="text" value="{$row.fuel_type|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Registration_date')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-registration_date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" name="row[registration_date]" type="text" value="{$row.registration_date|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Issue_date')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-issue_date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" name="row[issue_date]" type="text" value="{$row.issue_date|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Driving_book_number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-driving_book_number" data-rule="required" class="form-control" name="row[driving_book_number]" type="text" value="{$row.driving_book_number|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Scrap_deadline')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-scrap_deadline" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" name="row[scrap_deadline]" type="text" value="{$row.scrap_deadline|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Total_weight')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-total_weight" data-rule="required" class="form-control" name="row[total_weight]" type="text" value="{$row.total_weight|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Curb_weight')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-curb_weight" data-rule="required" class="form-control" name="row[curb_weight]" type="text" value="{$row.curb_weight|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Approved_weight')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-approved_weight" data-rule="required" class="form-control" name="row[approved_weight]" type="text" value="{$row.approved_weight|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Discharging_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-discharging_id" data-rule="required" data-source="discharging/index" class="form-control selectpage" name="row[discharging_id]" type="text" value="{$row.discharging_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Road_no')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-road_no" data-rule="required" class="form-control" name="row[road_no]" type="text" value="{$row.road_no|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Registration_certificate_number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-registration_certificate_number" data-rule="required" class="form-control" name="row[registration_certificate_number]" type="text" value="{$row.registration_certificate_number|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Insurance_expiration_date')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-insurance_expiration_date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" name="row[insurance_expiration_date]" type="text" value="{$row.insurance_expiration_date|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Driving_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-driving_type" data-rule="required" class="form-control" name="row[driving_type]" type="text" value="{$row.driving_type|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Id_number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-id_number" data-rule="required" class="form-control" name="row[id_number]" type="text" value="{$row.id_number|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Driving_license_number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-driving_license_number" data-rule="required" class="form-control" name="row[driving_license_number]" type="text" value="{$row.driving_license_number|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Contact_tel')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-contact_tel" data-rule="required" class="form-control" name="row[contact_tel]" type="text" value="{$row.contact_tel|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!-- <div class="input-group">
                <input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="textarea" value="{$row.images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul> -->
            <ul class="row list-inline faupload-preview" id="p-content_images">
                {volist name="$row['imagelist']" id="imagelist"}
                <li class="col-xs-3"><a href="{$imagelist|htmlentities}" data-url="{$imagelist|htmlentities}" target="_blank" class="thumbnail"><img src="{$imagelist|htmlentities}" onerror="this.src='{$imagelist|htmlentities}';this.onerror=null;" class="img-responsive"></a></li>
                {/volist}
            </ul>
        </div>
    </div>
    {if condition="$row['status'] eq 2 and $store_id eq 0"}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-status" class="form-control selectpicker"  name="row[status]">
                <option value="3">通过</option>
                <option value="4">拒绝</option>
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-num" class="form-control" data-rule="required" name="row[num]" type="number" value="{$row.num|htmlentities}">
        </div>
    </div>
    {/if}
   

    {if condition="$row['status'] eq 4"}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">审核状态:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remark" readonly class="form-control"  type="text" value="未通过">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remark" readonly class="form-control"  type="text" value="{$row.remark|htmlentities}">
        </div>
    </div>
    {/if}
    <div class="form-group" style="display: none;" id="remark">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remark" data-rule="required" class="form-control" name="row[remark]" type="text" value="{$row.remark|htmlentities}">
        </div>
    </div>
    
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Authen_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-authen_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[authen_time]" type="text" value="{:$row.authen_time?datetime($row.authen_time):''}">
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_del')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-is_del" class="form-control selectpicker" name="row[is_del]">
                {foreach name="isDelList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.is_del"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    {if condition="$store_id gt 0"}
    <div class="form-group" >
        <label class="control-label col-xs-12 col-sm-2">{:__('修改说明')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-change_title" data-rule="required" class="form-control" name="row[change_title]" type="text" style="height: 100px;"></textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('补充图片')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-change_images"  class="form-control" size="50" name="row[change_images]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-change_images" class="btn btn-danger faupload" data-input-id="c-change_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-change_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-change_images" class="btn btn-primary fachoose" data-input-id="c-change_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-change_images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-change_images"></ul>
            
        </div>
    </div>
    {else/}
    {if !empty($change_info)}
    <div class="form-group" >
        <label class="control-label col-xs-12 col-sm-2">{:__('修改说明')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-change_title" readonly  class="form-control" type="text" style="height: 100px;">{$change_info.change_title|htmlentities}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('补充图片')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!-- <div class="input-group">
                <input id="c-change_images" data-rule="required" class="form-control" size="50" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-change_images" class="btn btn-danger faupload" data-input-id="c-change_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-change_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-change_images" class="btn btn-primary fachoose" data-input-id="c-change_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-change_images"></span>
            </div> -->
            <ul class="row list-inline faupload-preview" id="p-change_images">
                {volist name="$change_images" id="change_images"}
                <li class="col-xs-3"><a href="{$change_images|htmlentities}" data-url="{$change_images|htmlentities}" target="_blank" class="thumbnail"><img src="{$change_images|htmlentities}" onerror="this.src='{$change_images|htmlentities}';this.onerror=null;" class="img-responsive"></a></li>
                {/volist}
            </ul>
            
        </div>
    </div>
    {/if}
    {/if}
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Add_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-add_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[add_time]" type="text" value="{:$row.add_time?datetime($row.add_time):''}">
        </div>
    </div> -->
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Qrcode')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-qrcode" data-rule="required" class="form-control" name="row[qrcode]" type="text" value="{$row.qrcode|htmlentities}">
        </div>
    </div> -->
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
